/* function inherit(Target, Origin) {
  function Buffer() {}
  Buffer.prototype = Origin.prototype;
  Target.prototype = new Buffer();
  Target.prototype.constructor = Target;
  Target.prototype.super_class = Origin;
}
 */
//升级版
let inherit = (function () {
  function Buffer() {}
  return function (Target, Origin) {
    Buffer.prototype = Origin.prototype;
    Target.prototype = new Buffer();
    Target.prototype.constructor = Target;
    Target.prototype.super_class = Origin;
  };
})();

Teacher.prototype.name = "Mr.";
function Teacher() {}
function Student() {}
inherit(Student, Teacher);
let s = new Student();
console.log(s);
